/* 
 * File:   MathUtil.h
 * Author: Pie
 *
 * Created on April 22, 2011, 7:28 PM
 */

#ifndef NRPSTG_MATHUTIL_H
#define	NRPSTG_MATHUTIL_H

#include <assimp.h>

inline float clampf(float c, float min, float max) {
    return c < min ? min : (c > max ? max : c);
}

void setIdentity(aiMatrix4x4* mat);
void getInverseV(aiMatrix4x4* mat, double* v);
void getAxes(aiMatrix4x4* mat, aiVector3D* x, aiVector3D* y, aiVector3D* z);
void applyTranslation(aiMatrix4x4* mat, aiVector3D* vec);
void applyRotationXYZ(aiMatrix4x4* mat, aiVector3D* vec);
void applyRotationX(aiMatrix4x4* mat, float a);
void applyRotationY(aiMatrix4x4* mat, float a);
void applyRotationZ(aiMatrix4x4* mat, float a);

void copyMatrix(aiMatrix4x4* mat, aiMatrix4x4* out);
//void printMatrix(aiMatrix4x4* mat);

#endif	/* MATHUTIL_H */

